﻿IF OBJECT_ID ('CHO_POLICY') IS NOT NULL
	DROP TABLE CHO_POLICY
GO

CREATE TABLE CHO_POLICY
	(
	POLICY_ID    INT NOT NULL,
	POLICY_DESC  NNVARCHAR (50) NOT NULL,
	CONSTRAINT PK_CHO_POLICY PRIMARY KEY (POLICY_ID)
	)
GO

INSERT INTO CHO_POLICY VALUES (1, 'Read Only')
GO
INSERT INTO CHO_POLICY VALUES (2, 'Add Task')
GO
INSERT INTO CHO_POLICY VALUES (3, 'Remove Task')
GO
INSERT INTO CHO_POLICY VALUES (4, 'Edit Task')
GO
INSERT INTO CHO_POLICY VALUES (5, 'Copy Task')
GO
INSERT INTO CHO_POLICY VALUES (6, 'Paste Task')
GO
INSERT INTO CHO_POLICY VALUES (7, 'Move Task')
GO
INSERT INTO CHO_POLICY VALUES (8, 'Export Tasks')
GO
INSERT INTO CHO_POLICY VALUES (9, 'Import Tasks')
GO
INSERT INTO CHO_POLICY VALUES (10, 'Start Task')
GO
INSERT INTO CHO_POLICY VALUES (11, 'Resume Task')
GO
INSERT INTO CHO_POLICY VALUES (12, 'Stop Task')
GO
INSERT INTO CHO_POLICY VALUES (13, 'Abort Task')
GO
INSERT INTO CHO_POLICY VALUES (14, 'Activate Task')
GO
INSERT INTO CHO_POLICY VALUES (15, 'Deactivate Task')
GO
INSERT INTO CHO_POLICY VALUES (16, 'Edit Holiday Calendar')
GO
INSERT INTO CHO_POLICY VALUES (17, 'Manager Users')
GO

----------------------------------------------------------------

IF OBJECT_ID ('dbo.CHO_SELECT_POLICY') IS NOT NULL
	DROP PROC dbo.CHO_SELECT_POLICY
GO

CREATE PROCEDURE [dbo].[CHO_SELECT_POLICY]
		AS

	SET NOCOUNT ON

	SELECT
		POLICY_ID,
		POLICY_DESC
	FROM 
		CHO_POLICY
GO
